package com.example.quartz.module.sms;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.example.quartz.common.base.BaseBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.SuperBuilder;

/**
 * @author: wlp
 * @description: 描述：任务调度实体
 * @projectName: QuartzTask
 * @date: 2019/10/11
 * @version: V1.0.0
 */
@SuperBuilder
@Setter
@Getter
@TableName("sms_quartz_task")
@ApiModel(value = "任务调度实体")
public class QuartzTask extends BaseBean {

    /**
     * 任务名称
     */
    @ApiModelProperty(example = "Quartz-Hello")
    private String quartzName;

    /**
     * 任务表达式
     */
    @ApiModelProperty(example = "3 * * * * ? ")
    private String quartzCron;

    /**
     * 执行的类
     */
    @ApiModelProperty(example = "helloTask")
    private String targetBean;

    /**
     * 执行方法
     */
    @ApiModelProperty(example = "executeMethod")
    private String targetMethod;

    /**
     * 执行方法
     */
    @ApiModelProperty(example = "targetContent")
    private String targetContent;

    /**
     * 执行参数
     */
    @ApiModelProperty(example = "Hello-Word!")
    private String params;

    /**
     * 任务类型- 1普通任务 2.模板任务
     */
    @ApiModelProperty(example = "1")
    private Integer quartzType;

    /**
     * 任务状态 0:正常  1：暂停
     */
    @TableField("quartz_status")
    private Integer quartzStatus;

    /**
     * 备注
     */
    @TableField(value = "remarks", strategy = FieldStrategy.IGNORED)
    protected String remarks = "备注";
}
